  <?php session_start();
  get_header(); ?>
  	<?php
		
		$cit = get_search_query();
		$_SESSION['cittaRicerca'] = $cit;
	?>

<div id="scroller-container">
<div id="galleria"><h3><strong><i>Offerte in Evidenza a: <?php echo $cit; ?><span id="citta"></span></i></strong></h3>    <div id="social"><div id="facebook"><iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FVolantinopoli%3Ffref%3Dts&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=true&amp;font&amp;colorscheme=light&amp;action=like&amp;height=80&amp;appId=342642402476340" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:240px; height:26px;" allowTransparency="true"></iframe></div><div id="twitter"><a href="https://twitter.com/Volantinopoli" class="twitter-follow-button" data-show-count="false" data-lang="it">Segui @Volantinopoli</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div><div class="clear"></div></div><div class="clear"></div></div>
    <div id="scroller">
	<script type="text/javascript">
	xmlhttp3="";
	cit = "<?php echo $cit; ?>";
	if(window.XMLHttpRequest)
	{
		xmlhttp3=new XMLHttpRequest();
	}
	xmlhttp3.open("GET", "getVolantini.php?citta="+cit, true);
	xmlhttp3.onreadystatechange=funzione2;
	xmlhttp3.send("");
	function funzione2() {
		if(xmlhttp3.readyState==4 && xmlhttp3.status==200){
			document.getElementById("scroller").innerHTML=xmlhttp3.responseText;
			mostraVolantinoSearch(10);
		}
	}
	
	</script>
    <ul>
    
<li>

    <?php $custom_query = new WP_Query('posts_per_page=4&offset=4'); 
while($custom_query->have_posts()) : $custom_query->the_post(); ?>


      


<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</li>

<li>
    <?php $custom_query = new WP_Query('posts_per_page=4&offset=8'); 
while($custom_query->have_posts()) : $custom_query->the_post(); ?>


      <div class="scroll-film">
                            

                            <div class="scroll-thumb"><a href="<?php the_permalink(); ?>"><img src="<?php echo catch_that_image() ?>"></a></div>
                            
                            <div class="scroll-film-toolbar clearfix">
                                
                                

 
                            </div>

                        </div>


<?php endwhile; ?>
<?php wp_reset_postdata(); ?>


</li>
</ul>

      
    </div>
</div>



<div id="content">

<div id="tabs_wrapper">
	<div id="tabs_container">
		<ul id="tabs">
			<li class="active"><a name="10" href="#tab1" onclick="mostraVolantino(this.name)">Alimentari</a></li>
            <li><a class="icon_accept" name="9" href="#tab2" onclick="mostraVolantino(this.name)">Abbigliamento</a></li>
			<li><a class="icon_accept" name="11" href="#" onclick="mostraVolantino(this.name)">Arredamento</a></li>
			<li><a name="12" href="#" onclick="mostraVolantino(this.name)">Elettronica</a></li>
            <li><a name="7" href="#tab5" onclick="mostraVolantino(this.name)">Salute & Benessere</a></li>
            <li><a name="10" href="#tab6" onclick="mostraVolantino(this.name)">Bricolage</a></li>
            <li><a name="17" href="#tab7" onclick="mostraVolantino(this.name)">Viaggi</a></li>
            <li><a name="18" href="#tab8" onclick="mostraVolantino(this.name)">Immobili</a></li>
            <li><a name="19" href="#tab9" onclick="mostraVolantino(this.name)">Ufficio</a></li>
            <li><a name="20" href="#tab10" onclick="mostraVolantino(this.name)">Infanzia</a></li>
            <li><a name="24" href="#tab11" onclick="mostraVolantino(this.name)">2 & 4 Ruote</a></li>
		</ul>
	</div>
	<div id="tabs_content_container">
	
	</div>
</div>

  
 
  <div class="clear"></div>
  
  </div>  


  

<?php get_footer(); ?>